RedDiscapacidad = function(){
	return {
		selectionChange: function(records, form){
			if(records && records.length > 0){
				Asg.Form.setValues(form, records[0].data);
			}
		},
		confirmProcess: function(grid, rowIndex, currentId){
			Asg.Message.confirm(Asg.constants.CONFIRM_DELETE_MESSAGE, function(btn){
				if(btn != "no") RedDiscapacidad.deleteDetails(grid, rowIndex, currentId);
			});
		},
		deleteDetails: function(grid, rowIndex, currentId) {
			var path = "/red/oferta/";
			switch(currentId){
				case "redDiscapacidadHorarioId":
					path += "deleteRedDiscapacidadHorario";
					break;
				case "redDiscapacidadFormacionAcademicaId":
					path += "deleteRedDiscapacidadFormacionAcademica";
					break;
				case "redDiscapacidadIdiomaId":
					path += "deleteRedDiscapacidadIdioma";
					break;
				case "redDiscapacidadConocimientoId":
					path += "deleteRedDiscapacidadConocimiento";
					break;
				case "redDiscapacidadHabilidadId":
					path += "deleteRedDiscapacidadHabilidad";
					break;
				case "redDiscapacidadSucursales.redDiscapacidadSucursalId":
					path += "deleteRedDiscapacidadSucursales";
					break;
				case "redDiscapacidadContacto.redDiscapacidadContactoId":
					path += "deleteRedDiscapacidadContacto";
					break;
				default: return;
			}
 		   var rows = [grid.getStore().getAt(rowIndex)];
 		   var currentIdAsLong = rows[0].get(currentId);
 		   var redDiscapacidadId = Asg.Utils.getValue("redDiscapacidadId");
 		   Asg.Message.progress("Actualizando Informaci\u00F3n...");
 		   Ext.Ajax.request({
              timeout: Asg.constants.TIMEOUT_SECONDS,
              url: Asg.constants.CONTEXT_PATH + path,
              params: {redDiscapacidadId: redDiscapacidadId, currentId: currentIdAsLong},
              callback: function(options, success, response){
                  Ext.Msg.hide();
                  var jsonObject = Asg.Utils.ajaxRequestGetJson(response);
                  if(!success || !jsonObject || jsonObject.failure){
                      Asg.Message.alertInvalid(Asg.constants.DEFAULT_ERROR_MESSAGE);
                      return
                  }
                  if(!Ext.isEmpty(jsonObject.message)) Asg.Message.alert(jsonObject.message);
                  if(jsonObject.list){
						Asg.Grid.loadData(grid.id, jsonObject.list);
						if(currentId == "redDiscapacidadSucursales.redDiscapacidadSucursalId"){
							Asg.Combo.loadData("redDiscapacidadContactoSucursalId", jsonObject.list);
						}
					}
              }
           });
 	    },
		resetFormDetails: function(form){
			form = Ext.getCmp(form);
			form.getForm().reset();
		},
		saveDetails: function(form, grid){
			if(Ext.isEmpty(Asg.Utils.getValue("redDiscapacidadId"))) {
				Asg.Message.alertInvalid("Debe Guardar la Oferta antes de continuar");
				return;
			}
			var path = "/red/oferta/";
			var params = {};
			var redDiscapacidadId = Asg.Utils.getValue("redDiscapacidadId");;
			switch(form){
				case "redDiscapacidadHorarioForm":
					path += "saveRedDiscapacidadHorario";
					params["redDiscapacidadHorario.redDiscapacidad.redDiscapacidadId"] = redDiscapacidadId;
					break;
				case "redDiscapacidadFormacionAcademicaForm":
					path += "saveRedDiscapacidadFormacionAcademica";
					params["redDiscapacidadFormacionAcademica.redDiscapacidad.redDiscapacidadId"] = redDiscapacidadId;
					break;
				case "redDiscapacidadIdiomaForm":
					path += "saveRedDiscapacidadIdioma";
					params["redDiscapacidadIdioma.redDiscapacidad.redDiscapacidadId"] = redDiscapacidadId;
					break;
				case "redDiscapacidadConocimientosForm":
					path += "saveRedDiscapacidadConocimiento";
					params["redDiscapacidadConocimiento.redDiscapacidad.redDiscapacidadId"] = redDiscapacidadId;
					break;
				case "redDiscapacidadHabilidadForm":
					path += "saveRedDiscapacidadHabilidad";
					params["redDiscapacidadHabilidad.redDiscapacidad.redDiscapacidadId"] = redDiscapacidadId;
					break;
				case "redDiscapacidadSucursalesForm":
					path += "saveRedDiscapacidadSucursales";
					params["redDiscapacidadSucursales.redDiscapacidad.redDiscapacidadId"] = redDiscapacidadId;
					break;
				case "redDiscapacidadContactoForm":
					path += "saveRedDiscapacidadContacto";
					params["redDiscapacidadContacto.redDiscapacidad.redDiscapacidadId"] = redDiscapacidadId;
					break;
				default: return;
			}
			form = Ext.getCmp(form);
			Asg.Message.progress("Guardando Informaci\u00F3n...");
			form.getForm().submit({
    			url: Asg.constants.CONTEXT_PATH + path,
    			timeout: Asg.constants.TIMEOUT_SECONDS,
    			reset: true,
    			params: params,
    			success: function(form, action){
    				Asg.Message.alert(action.result.message);
					if(action.result.success){
						if(action.result.list){
							Asg.Grid.loadData(grid, action.result.list);
							if(form.id == "redDiscapacidadSucursalesForm"){
								Asg.Combo.loadData("redDiscapacidadContactoSucursalId", action.result.list);
							}
						}
					}
    			},
    			failure: Asg.Form.failureProcedure
   			});
		},
		move: function(layout, direction){
			layout[direction]();
			Ext.getCmp("redDiscapacidadSiguienteButton").setDisabled(!layout.getPrev());
		    Ext.getCmp("redDiscapacidadAnteriorButton").setDisabled(!layout.getNext());
		},
		navigate: function(panel, direction){
		    var layout = panel.getLayout();
		    var form = layout.getActiveItem();
		    var formId = form.getId();
		    var jsonParams = {};
		    if(formId == "redDiscapacidadPaso4" || formId == "redDiscapacidadPaso5"){
		    	RedDiscapacidad.move(layout, direction);
		    	return;
		    }else{
		    	var path = "/red/oferta/";
		    	var params = {};
		    	switch(formId){
		    		case "redDiscapacidadForm":
		    			path += "saveRedDiscapacidad";
		    			params["redDiscapacidad.redDiscapacidadId"] = Asg.Utils.getValue("redDiscapacidadId");
		    			break;
		    		case "redDiscapacidadPaso2":
		    			form = Ext.getCmp("redDiscapacidadDatosForm");
		    			path += "saveRedDiscapacidadDatos";
		    			params["redDiscapacidadDatos.redDiscapacidad.redDiscapacidadId"] = Asg.Utils.getValue("redDiscapacidadId");
		    			break;
		    		case "redDiscapacidadRequisitosForm":
		    			path += "saveRedDiscapacidadRequisitos";
		    			params["redDiscapacidadRequisito.redDiscapacidad.redDiscapacidadId"] = Asg.Utils.getValue("redDiscapacidadId");
		    			break;
		    		case "redDiscapacidadPaso6":
		    			form = Ext.getCmp("redDiscapacidadEntrevistaForm");
		    			path += "saveRedDiscapacidadDatosEntrevista";
		    			params["redDiscapacidadDatosEntrevista.redDiscapacidad.redDiscapacidadId"] = Asg.Utils.getValue("redDiscapacidadId");
		    			break;
		    		default: return;
		    	}
		    	Asg.Message.progress("Guardando Informaci\u00F3n...");
			    form.getForm().submit({
	    			url: Asg.constants.CONTEXT_PATH + path,
	    			timeout: Asg.constants.TIMEOUT_SECONDS,
	    			params: params,
	    			success: function(form, action){
	    				Asg.Message.alert(action.result.message);
						if(action.result.success){
							if(action.result.redDiscapacidadId) Asg.Utils.setValue("redDiscapacidadId", action.result.redDiscapacidadId);
							if(action.result.redDiscapacidadFecha) Asg.Utils.setValue("redDiscapacidadFecha", action.result.redDiscapacidadFecha);
							RedDiscapacidad.move(layout, direction);
						}
	    			},
	    			failure: Asg.Form.failureProcedure
	   			});
		    }
		},
		openWindow: function(redDiscapacidadId){
			Asg.Message.progress("Cargando Informaci\u00F3n...");
            Ext.Ajax.request({
                timeout: Asg.constants.TIMEOUT_SECONDS,
                url: Asg.constants.CONTEXT_PATH + "/red/oferta/findById",
                params: {redDiscapacidadId: redDiscapacidadId},
                callback: function(options, success, response){
                    Ext.Msg.hide();
                    var jsonObject = Asg.Utils.ajaxRequestGetJson(response);
                    if(!success || !jsonObject || jsonObject.failure){
                        Asg.Message.alertInvalid(Asg.constants.DEFAULT_ERROR_MESSAGE);
                        return
                    }
                    RedDiscapacidad.showWindow(jsonObject);
                }
            });
		},
		showWindow: function(config){
			if(!config) config = {};
			if(!config.redDiscapacidad) config.redDiscapacidad = {};
			if(!config.redDiscapacidadDatos) config.redDiscapacidadDatos = {};
			if(!config.redDiscapacidadRequisito) config.redDiscapacidadRequisito = {};
			if(!config.redDiscapacidadDatosEntrevista) config.redDiscapacidadDatosEntrevista = {};
			if(!config.catalogos) config.catalogos = {};
			new Ext.Window({
				width: 850,
				height: 500,
				layout: "fit",
				id: "redDiscapacidadWindow",
				maximizable: true,
				modal: true,
				title: Asg.constants.APPLICATION_TITLE,
				items: {
					border: false,
					layout: "card",
					//activeItem: 5,
					items: [
				        {
				        	xtype: "form",
				        	id: "redDiscapacidadForm",
				        	title: "Paso #1: Potencias Fisico y Psiquico",
				        	border: false,
	        	        	bodyPadding: "5 5 5 5",
	        	        	autoScroll: true,
	        	        	layout: {
	        	        		type: "table",
								columns: 3,
								tableAttrs: {
						            style: {width: "795px", "margin-top": "5px;"},
						            align: "center"
								}
	        	        	},
	        	        	defaults: Asg.Form.defaults({width: 260, height: 130}),
	        	        	items: [
    	        	        	{xtype: "label", text: "- Postura -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 3},
        	        	        {
        	        	        	xtype: "fieldset",
        	        	        	title: "De Pie",
        	        	        	items: [
    	        	        	        {xtype: "radio", inputValue: "1", boxLabel: "Imposible"},
    	        	        	        {xtype: "radio", inputValue: "2", boxLabel: "Periodos Cortos"},
    	        	        	        {xtype: "radio", inputValue: "3", boxLabel: "Casi toda la jornada"},
    	        	        	        {xtype: "radio", inputValue: "4", boxLabel: "Toda la jornada de trabajo"}
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Sentado",
        	        	        	items: [
    	        	        	        {xtype: "radio", inputValue: "1", boxLabel: "Imposible"},
    	        	        	        {xtype: "radio", inputValue: "2", boxLabel: "Periodos Cortos"},
    	        	        	        {xtype: "radio", inputValue: "3", boxLabel: "Casi toda la jornada"},
    	        	        	        {xtype: "radio", inputValue: "4", boxLabel: "Toda la jornada de trabajo"}
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Otra",
        	        	        	items: [
    	        	        	        {xtype: "radio", inputValue: "1", boxLabel: "Ninguna"},
    	        	        	        {xtype: "radio", inputValue: "2", boxLabel: "Forma ocasional"},
    	        	        	        {xtype: "radio", inputValue: "3", boxLabel: "Cualquier postura"}
	        	        	        ]
        	        	        },
        	        	        {xtype: "label", text: "- Locomoci\u00F3n -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 3},
        	        	        {
        	        	        	xtype: "fieldset",
        	        	        	title: "Caminar",
        	        	        	height: 150,
        	        	        	items: [
    	        	        	        {xtype: "radio", inputValue: "1", boxLabel: "Imposible"},
    	        	        	        {xtype: "radio", inputValue: "2", boxLabel: "Periodos Cortos"},
    	        	        	        {xtype: "radio", inputValue: "3", boxLabel: "	Necesita descanso ocasional"},
    	        	        	        {xtype: "radio", inputValue: "4", boxLabel: "Toda la jornada"}
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Subir Escaleras",
        	        	        	height: 150,
        	        	        	items: [
    	        	        	        {xtype: "radio", inputValue: "1", boxLabel: "Imposible"},
    	        	        	        {xtype: "radio", inputValue: "2", boxLabel: "Lentamente"},
    	        	        	        {xtype: "radio", inputValue: "3", boxLabel: "Poca dificultad"},
    	        	        	        {xtype: "radio", inputValue: "4", boxLabel: "Sin dificultad"},
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Levantar y Transportar",
        	        	        	height: 150,
        	        	        	items: [
    	        	        	        {xtype: "radio", inputValue: "1", boxLabel: "Imposible"},
    	        	        	        {xtype: "radio", inputValue: "2", boxLabel: "Hasta 20 lbs."},
    	        	        	        {xtype: "radio", inputValue: "3", boxLabel: "Hasta 40 lbs."},
    	        	        	        {xtype: "radio", inputValue: "4", boxLabel: "Hasta 60 lbs."},
    	        	        	        {xtype: "radio", inputValue: "5", boxLabel: "Mas de 60 lbs."}
	        	        	        ]
        	        	        },
        	        	        {xtype: "label", text: "- Extremidades Superiores -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 3},
        	        	        {
        	        	        	xtype: "fieldset",
        	        	        	title: "Movimiento",
        	        	        	height: 140,
        	        	        	layout: {
        	        	        		type: "table",
        								columns: 3
        	        	        	},
        	        	        	items: [
    	        	        	        {xtype: "label", text: "Izq.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Der.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Movimiento", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "label", text: "Imposible", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "label", text: "Menor a 30 cms.", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "label", text: "Menor a 60 cms.", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "label", text: "Menor a 80 cms.", cls: "x-form-item"}
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Fuerza",
        	        	        	height: 140,
        	        	        	layout: {
        	        	        		type: "table",
        								columns: 3
        	        	        	},
        	        	        	items: [
    	        	        	        {xtype: "label", text: "Izq.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Der.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Fuerza", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "label", text: "Imposible", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "label", text: "Hasta 20 lbs.", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "label", text: "Hasta 35 lbs.", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "label", text: "Mas de 35 lbs.", cls: "x-form-item"}
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Preci\u00F3n",
        	        	        	height: 140,
        	        	        	layout: {
        	        	        		type: "table",
        								columns: 3
        	        	        	},
        	        	        	items: [
    	        	        	        {xtype: "label", text: "Izq.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Der.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Preci\u00F3", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "label", text: "Imposible", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "label", text: "No requiere especial precisi\u00F3n", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "label", text: "Menos preci\u00F3n", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "label", text: "Con preci\u00F3n", cls: "x-form-item"}
	        	        	        ]
        	        	        },
        	        	        {xtype: "label", text: "- Extremidades Inferiores -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 3},
        	        	        {
        	        	        	xtype: "fieldset",
        	        	        	title: "Movilidad",
        	        	        	height: 140,
        	        	        	layout: {
        	        	        		type: "table",
        								columns: 3
        	        	        	},
        	        	        	colspan: 3,
        	        	        	items: [
    	        	        	        {xtype: "label", text: "Izq.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Der.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Movilidad", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "label", text: "Imposible", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "label", text: "Movilidad Limitada", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "label", text: "Con alguna frecuencia", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "label", text: "Constantemente", cls: "x-form-item"}
	        	        	        ]
        	        	        },
        	        	        {xtype: "label", text: "- Audici\u00F3n -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 3},
        	        	        {
        	        	        	xtype: "fieldset",
        	        	        	title: "Capacidad Auditiva",
        	        	        	height: 140,
        	        	        	layout: {
        	        	        		type: "table",
        								columns: 3
        	        	        	},
        	        	        	items: [
    	        	        	        {xtype: "label", text: "Izq.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Der.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Capacidad Auditiva", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "label", text: "Imposible", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "label", text: "Limitada", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "label", text: "Normal", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "label", text: "Excelente", cls: "x-form-item"}
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Hablar",
        	        	        	height: 140,
        	        	        	colspan: 2,
        	        	        	items: [
    	        	        	        {xtype: "radio", inputValue: "1", boxLabel: "Imposible"},
    	        	        	        {xtype: "radio", inputValue: "2", boxLabel: "Limitada"},
    	        	        	        {xtype: "radio", inputValue: "3", boxLabel: "Normal"},
    	        	        	        {xtype: "radio", inputValue: "4", boxLabel: "Excelente"}
	        	        	        ]
        	        	        },
        	        	        {xtype: "label", text: "- Visi\u00F3n -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 3},
        	        	        {
        	        	        	xtype: "fieldset",
        	        	        	title: "Pr\u00F3xima",
        	        	        	height: 140,
        	        	        	layout: {
        	        	        		type: "table",
        								columns: 3
        	        	        	},
        	        	        	items: [
    	        	        	        {xtype: "label", text: "Izq.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Der.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Pr\u00F3xima", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "label", text: "Ciega", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "label", text: "Poca agudez visual", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "label", text: "Suficiente agudeza visual", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "label", text: "Buena agudeza visual", cls: "x-form-item"}
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Lejana",
        	        	        	height: 140,
        	        	        	layout: {
        	        	        		type: "table",
        								columns: 3
        	        	        	},
        	        	        	items: [
    	        	        	        {xtype: "label", text: "Izq.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Der.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Lejana", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "label", text: "Ciega", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "label", text: "Distancia de hasta 2 mts.", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "radio", inputValue: "3", width: 30},
    	        	        	        {xtype: "label", text: "Distancia de hasta 4 mts.", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "radio", inputValue: "4", width: 30},
    	        	        	        {xtype: "label", text: "Distancia mayor de 4 mts.", cls: "x-form-item"}
	        	        	        ]
        	        	        },{
        	        	        	xtype: "fieldset",
        	        	        	title: "Diferencia Colores",
        	        	        	height: 140,
        	        	        	layout: {
        	        	        		type: "table",
        								columns: 3
        	        	        	},
        	        	        	items: [
    	        	        	        {xtype: "label", text: "Izq.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Der.", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "label", text: "Diferencia Colores", cls: "x-form-item", style: "text-align: center; font-weight: bold"},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "radio", inputValue: "1", width: 30},
    	        	        	        {xtype: "label", text: "No diferencia", cls: "x-form-item"},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "radio", inputValue: "2", width: 30},
    	        	        	        {xtype: "label", text: "Puede diferenciar", cls: "x-form-item"}
	        	        	        ]
        	        	        },
    	        	        ]
				        },{
				        	id: "redDiscapacidadPaso2",
				        	title: "Paso #2: Datos de la Oferta",
				        	border: false,
				        	autoScroll: true,
				        	items: [
				        		{
						        	xtype: "form",
						        	id: "redDiscapacidadDatosForm",
						        	border: false,
			        	        	bodyPadding: "5 5 5 5",
			        	        	layout: {
			        	        		type: "table",
										columns: 2,
										tableAttrs: {
								            style: {width: "665px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({width: 400}),
			        	        	items: [
		    	        	        	{xtype: "label", text: "Puesto Ofrecido:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoPuesto",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoPuesto,
		    	        	        		maxLength: 50
		    	        	        	},
		    	        	        	{xtype: "label", text: "Ocupaci\u00F3n:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadDatos.ctgOcupacion.ocupacionCodigo",
		    	        	        		value: config.redDiscapacidadDatos.ctgOcupacionId,
		    	        	        		store: new Ext.data.SimpleStore({
		                                        data: config.catalogos.ctgOcupaciones || [],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},
		    	        	        	{xtype: "label", text: "No. Plazas:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "numberfield",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoCantidadPlazas",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoCantidadPlazas,
		    	        	        		allowDecimals: false,
		    	        	        		hideTrigger: true,
		    	        	        		maxLengh: 5
		    	        	        	},
		    	        	        	{xtype: "label", text: "Salario Ofrecido:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "numericfield",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoSalario",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoSalario
		    	        	        	},
		    	        	        	{xtype: "label", text: "Forma de Pago:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadDatos.ctgFormaPago.ctgCatalogoId",
		    	        	        		value: config.redDiscapacidadDatos.ctgFormaPagoId,
		    	        	        		store: new Ext.data.SimpleStore({
		                                        data: config.catalogos.ctgFormasPago || [],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},
		    	        	        	{xtype: "label", text: "Periocidad de Pago:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoPeriodicidadPago",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoPeriodicidadPago,
		    	        	        		store: new Ext.data.SimpleStore({
		                                        data: [["1", "CATORCENAL"], ["2", "DIARIO"], ["3", "MENSUAL"], ["4", "QUINCENAL"], ["5", "SEMANAL"]],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},
		    	        	        	{xtype: "label", text: "Forma de Contrataci\u00F3n:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoFormaContratacion",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoFormaContratacion,
		    	        	        		store: new Ext.data.SimpleStore({
		                                        data: [["1", "PERMANENTE"], ["2", "TEMPORAL"]],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},
		    	        	        	{xtype: "label", text: "Prestaciones Ofrecidas:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: 'checkboxgroup',
		    	        	        		columns: 2,
		    	        	        		vertical: true,
		    	        	        		maxHeight: 50,
		    	        	        		height: 50,
		    	        	        		autoScroll: true,
		    	        	        		items: config.redDiscapacidadPrestaciones || []
		    	        	        	},
		    	        	        	{xtype: "label", text: "Jornada de Trabajo:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadDatos.ctgJornadaLaboral.ctgCatalogoId",
		    	        	        		value: config.redDiscapacidadDatos.ctgJornadaLaboralId,
		    	        	        		store: new Ext.data.SimpleStore({
		                                        data: config.catalogos.ctgJornadaLaborales || [],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},
		    	        	        	{xtype: "label", text: "Periodo de Prueba:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "numberfield",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoPeriodoPrueba",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoPeriodoPrueba,
		    	        	        		allowDecimals: false,
		    	        	        		hideTrigger: true,
		    	        	        		maxLength: 5
		    	        	        	},
		    	        	        	{xtype: "label", text: "\u00BFLa oferta requiere persona con discapcidad\u003F:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoDiscapacidad",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoDiscapacidad,
		    	        	        		store: new Ext.data.SimpleStore({
		                                        data: Asg.Combo.yesnoArray(),
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},
		    	        	        	{xtype: "label", text: "Descripci\u00F3n General del Puesto:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "textarea",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoDescripcion",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoDescripcion,
		    	        	        		height: 50
		    	        	        	},
		    	        	        	{xtype: "label", text: "Funciones:", cls: "x-form-item", width: 250},
		    	        	        	{
		    	        	        		xtype: "textarea",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoFunciones",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoFunciones,
		    	        	        		height: 50
		    	        	        	},{
		    	        	        		xtype: "hidden",
		    	        	        		name: "redDiscapacidadDatos.redDiscapacidadDatoId",
		    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadDatoId,
		    	        	        		width: 10
		    	        	        	}
	    	        	        	]
					        	},{
					        		xtype: "form",
						        	id: "redDiscapacidadHorarioForm",
						        	border: false,
			        	        	bodyPadding: "5 5 5 5",
			        	        	layout: {
			        	        		type: "table",
										columns: 6,
										tableAttrs: {
								            style: {width: "665px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({labelAlign: "top", allowBlank: false}),
			        	        	items: [
		    	        	        	{xtype: "label", text: "- Horario de Trabajo -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 6},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadHorario.redDiscapacidadHorarioDiaInicio",
		    	        	        		fieldLabel: "D\u00EDa Inicial",
		    	        	        		store: new Ext.data.SimpleStore({
		    	        	        			data: Asg.Combo.daysOfWeek(),
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id",
			                                width: 100
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadHorario.redDiscapacidadHorarioHoraInicio",
		    	        	        		fieldLabel: "Hora Inicio",
		    	        	        		vtype: "hora",
		    	        	        		width: 80
		    	        	        	},{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadHorario.redDiscapacidadHorarioInicioAmPm",
		    	        	        		fieldLabel: "AM/PM",
		    	        	        		store: new Ext.data.SimpleStore({
		    	        	        			data: [["AM", "AM"], ["PM", "PM"]],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id",
		    	        	        		width: 80
		    	        	        	},{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadHorario.redDiscapacidadHorarioDiaFin",
		    	        	        		fieldLabel: "D\u00EDa Fin",
		    	        	        		store: new Ext.data.SimpleStore({
		    	        	        			data: Asg.Combo.daysOfWeek(),
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id",
			                                width: 100
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadHorario.redDiscapacidadHorarioHoraFin",
		    	        	        		fieldLabel: "Hora Fin",
		    	        	        		vtype: "hora",
		    	        	        		width: 80
		    	        	        	},{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadHorario.redDiscapacidadHorarioFinAmPm",
		    	        	        		fieldLabel: "AM/PM",
		    	        	        		store: new Ext.data.SimpleStore({
		    	        	        			data: [["AM", "AM"], ["PM", "PM"]],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id",
		    	        	        		width: 80
		    	        	        	},{
		                            		xtype: "grid",
		                            		id: "redDiscapacidadHorarioGrid",
		                            		store: new Ext.data.SimpleStore({
		                            			fields: [
													"redDiscapacidadHorarioId",
													"redDiscapacidadHorarioDiaInicio",
													"redDiscapacidadHorarioHoraInicio",
													"redDiscapacidadHorarioInicioAmPm",
													"redDiscapacidadHorarioDiaFin",
													"redDiscapacidadHorarioHoraFin",
													"redDiscapacidadHorarioFinAmPm"
												],
												data: config.redDiscapacidadHorarioList || []
		                            		}),
		                            		columns: [
													{
													   xtype: "actioncolumn",
													   width: 30,
													   hidden: false,
													   items: [
												        {
												     	   icon: Asg.constants.CONTEXT_PATH + "/resources/images/delete.png", 
												     	   iconCls: "icon", 
												     	   handler: function(grid, rowIndex, colIndex) {
												     		   RedDiscapacidad.confirmProcess(grid, rowIndex, "redDiscapacidadHorarioId");
												     	   }
												        }
												    ]
												  },
		                        		          {header: "D\u00EDa Inicial", dataIndex: "redDiscapacidadHorarioDiaInicio", flex: 1, renderer: Asg.Combo.decodeDay},
		                        		          {header: "Hora Inicial", dataIndex: "redDiscapacidadHorarioHoraInicio", flex: 1},
		                        		          {dataIndex: "redDiscapacidadHorarioInicioAmPm", flex: 1},
		                        		          {header: "D\u00EDa Final", dataIndex: "redDiscapacidadHorarioDiaFin", flex: 1, renderer: Asg.Combo.decodeDay},
		                        		          {header: "Hora Inicial", dataIndex: "redDiscapacidadHorarioHoraFin", flex: 1},
		                        		          {dataIndex: "redDiscapacidadHorarioFinAmPm", flex: 1}
		                    		        ],
		                    		        tbar: [
		                		               "->",
		                		               {
		                		            	   text: "Nuevo",
		                		            	   iconCls: Asg.constants.ADD_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.resetFormDetails("redDiscapacidadHorarioForm");
		                		            	   }
		                		               },{
		                		            	   text: "Guardar",
		                		            	   iconCls: Asg.constants.SAVE_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.saveDetails("redDiscapacidadHorarioForm","redDiscapacidadHorarioGrid");
		                		            	   }
		                		               }
		            		                ],
		    	        	        		width: 655,
		    	        	        		height: 200,
		    	        	        		colspan: 6
		    	        	        	}
	    	        	        	]
					        	}
	        	        	]
				        },{
				        	xtype: "form",
				        	id: "redDiscapacidadRequisitosForm",
				        	title: "Paso #3: Requisitos Generales del Puesto",
				        	border: false,
	        	        	bodyPadding: "5 5 5 5",
	        	        	autoScroll: true,
	        	        	layout: {
	        	        		type: "table",
								columns: 4,
								tableAttrs: {
						            style: {width: "565px", "margin-top": "5px;"},
						            align: "center"
								}
	        	        	},
	        	        	defaults: Asg.Form.defaults({labelAlign: "top", width: 400, colspan: 2}),
	        	        	items: [
    	        	        	{xtype: "label", text: "Experiencia:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "numericfield",
    	        	        		name: "redDiscapacidadRequisito.redDiscapacidadRequisitoExperiencia",
    	        	        		value: config.redDiscapacidadRequisito.redDiscapacidadRequisitoExperiencia,
    	        	        		allowDecimals: false,
    	        	        		maxLenght: 5
    	        	        			
    	        	        	},
    	        	        	{xtype: "label", text: "Rango de Edad Preferente:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "checkbox",
    	        	        		name: "redDiscapacidadRequisito.redDiscapacidadRequisitoIndiferente",
    	        	        		value: config.redDiscapacidadRequisito.redDiscapacidadRequisitoIndiferente,
    	        	        		fieldLabel: "Indiferente"
    	        	        	},
    	        	        	{xtype: "hidden", width: 150},
    	        	        	{
    	        	        		xtype: "numericfield",
    	        	        		name: "redDiscapacidadRequisito.redDiscapacidadRequisitoEdaMinima",
    	        	        		value: config.redDiscapacidadRequisito.redDiscapacidadRequisitoEdadMinima,
    	        	        		fieldLabel: "Edad Inicial",
    	        	        		allowDecimals: false,
    	        	        		width: 150,
    	        	        		colspan: 1,
    	        	        		maxLength: 5,
    	        	        		labelAlign: "left"
    	        	        	},{
    	        	        		xtype: "numericfield",
    	        	        		name: "redDiscapacidadRequisito.redDiscapacidadRequisitoEdaMaxima",
    	        	        		value: config.redDiscapacidadRequisito.redDiscapacidadRequisitoEdadMaxima,
    	        	        		fieldLabel: "Edad Final",
    	        	        		allowDecimals: false,
    	        	        		width: 150,
    	        	        		colspan: 1,
    	        	        		maxLength: 5,
    	        	        		labelAlign: "left"
    	        	        	},
    	        	        	{xtype: "label", text: "Sexo:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "checkbox",
    	        	        		fieldLabel: "Indiferente",
    	        	        		name: "redDiscapacidadRequisito.redDiscapacidadRequisitoSexoIndiferente",
    	        	        		value: config.redDiscapacidadRequisito.redDiscapacidadRequisitoSexoIndiferente
    	        	        	},
    	        	        	{xtype: "hidden", width: 150},
    	        	        	{
    	        	        		xtype: "combo",
    	        	        		name: "redDiscapacidadRequisito.ctgGenero.ctgCatalogoId",
    	        	        		value: config.redDiscapacidadRequisito.ctgGeneroId,
    	        	        		store: new Ext.data.SimpleStore({
                                        data: config.catalogos.ctgGeneros || [],
                                        fields: ["id", "value"]
	                                }),
	                                displayField: "value",
	                                valueField: "id"
    	        	        	},
    	        	        	{xtype: "label", text: "Estado Familiar:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "combo",
    	        	        		name: "redDiscapacidadRequisito.ctgEstadoCivil.ctgCatalogoId",
    	        	        		value: config.redDiscapacidadRequisito.ctgEstadoCivilId,
    	        	        		store: new Ext.data.SimpleStore({
    	        	        			data: config.catalogos.ctgEstadosCiviles || [],
                                        fields: ["id", "value"]
	                                }),
	                                displayField: "value",
	                                valueField: "id"
    	        	        	},
    	        	        	{xtype: "label", text: "Caracteristicas Personales:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "textarea",
    	        	        		name: "redDiscapacidadRequisito.redDiscapacidadRequisitoCarateristicasPersonales",
    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadRequisitoCarateristicasPersonales,
    	        	        		height: 50
    	        	        	},
    	        	        	{xtype: "label", text: "Documentos a Presentar:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: 'checkboxgroup',
    	        	        		columns: 2,
    	        	        		vertical: true,
    	        	        		height: 100,
    	        	        		items: config.redDiscapacidadDocumentos || []
    	        	        	},
    	        	        	{xtype: "label", text: "Otros Requisitos:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: 'checkboxgroup',
    	        	        		columns: 2,
    	        	        		vertical: true,
    	        	        		height: 100,
    	        	        		items: config.redDiscapacidadOtrosRequisitos || []
    	        	        	},
    	        	        	{xtype: "label", text: "Licencia de Conducir:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "combo",
    	        	        		name: "redDiscapacidadDatos.redDiscapacidadRequisitoLicencia",
    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadRequisitoLicencia,
    	        	        		store: new Ext.data.SimpleStore({
                                        data: Asg.Combo.yesnoArray(),
                                        fields: ["id", "value"]
	                                }),
	                                displayField: "value",
	                                valueField: "id"
    	        	        	},
    	        	        	{xtype: "label", text: "Clase de Licencia:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "combo",
    	        	        		name: "redDiscapacidadRequisito.ctgTipoLicencia.ctgCatalogoId",
    	        	        		value: config.redDiscapacidadRequisito.ctgTipoLicenciaId,
    	        	        		store: new Ext.data.SimpleStore({
    	        	        			data: config.catalogos.ctgTipoLicencias || [],
                                        fields: ["id", "value"]
	                                }),
	                                displayField: "value",
	                                valueField: "id"
    	        	        	},
    	        	        	{xtype: "label", text: "Veh\u00EDculo:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "combo",
    	        	        		name: "redDiscapacidadDatos.redDiscapacidadRequisitoVehiculo",
    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadRequisitoVehiculo,
    	        	        		store: new Ext.data.SimpleStore({
                                        data: Asg.Combo.yesnoArray(),
                                        fields: ["id", "value"]
	                                }),
	                                displayField: "value",
	                                valueField: "id"
    	        	        	},
    	        	        	{xtype: "label", text: "Tipo de Veh\u00EDculo:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "combo",
    	        	        		name: "redDiscapacidadRequisito.ctgTipoVehiculo.ctgCatalogoId",
    	        	        		value: config.redDiscapacidadRequisito.ctgTipoVehiculo,
    	        	        		store: new Ext.data.SimpleStore({
    	        	        			data: config.catalogos.ctgTipoVehiculos || [],
                                        fields: ["id", "value"]
	                                }),
	                                displayField: "value",
	                                valueField: "id"
    	        	        	},
    	        	        	{xtype: "label", text: "A\u00F1o:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "numericfield",
    	        	        		name: "redDiscapacidadDatos.redDiscapacidadRequisitoAnioVehiculo",
    	        	        		value: config.redDiscapacidadDatos.redDiscapacidadRequisitoAnioVehiculo,
    	        	        		minLength: 4,
    	        	        		maxLength: 4
    	        	        	},
    	        	        	{xtype: "label", text: "Disponibilidad:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: 'checkboxgroup',
    	        	        		columns: 2,
    	        	        		vertical: true,
    	        	        		height: 100,
    	        	        		items: config.redDiscapacidadDisponibilidad || []
    	        	        	},
    	        	        	{xtype: "label", text: "Incorporaci\u00F3n:", cls: "x-form-item", width: 150},
    	        	        	{
    	        	        		xtype: "combo",
    	        	        		name: "redDiscapacidadRequisito.ctgIncorporacion.ctgCatalogoId",
    	        	        		value: config.redDiscapacidadRequisito.ctgIncorporacionId,
    	        	        		store: new Ext.data.SimpleStore({
    	        	        			data: config.catalogos.ctgTipoIncoporaciones || [],
                                        fields: ["id", "value"]
	                                }),
	                                displayField: "value",
	                                valueField: "id"
    	        	        	},{
    	        	        		xtype: "hidden",
    	        	        		name: "redDiscapacidadRequisito.redDiscapacidadRequisitoId",
    	        	        		value: config.redDiscapacidadRequisito.redDiscapacidadRequisitoId,
    	        	        		width: 10
    	        	        	}
	        	        	]
				        },{
				        	id: "redDiscapacidadPaso4",
				        	title: "Paso #4: Formaci\u00F3n Acad\u00E9mica",
				        	border: false,
				        	autoScroll: true,
				        	items: [
			        	        {
						        	xtype: "form",
						        	id: "redDiscapacidadFormacionAcademicaForm",
						        	border: false,
			        	        	bodyPadding: "5 5 5 5",
			        	        	layout: {
			        	        		type: "table",
										columns: 2,
										tableAttrs: {
								            style: {width: "615px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({labelAlign: "top", width: 300, allowBlank: false}),
			        	        	items: [
		    	        	        	{xtype: "label", text: "- Formaci\u00F3n Acad\u00E9mica -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 2},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadFormacionAcademica.ctgEscolaridad.ctgCatalogoId",
		    	        	        		fieldLabel: "Escolaridad",
		    	        	        		store: new Ext.data.SimpleStore({
		    	        	        			data: config.catalogos.ctgEscolaridades || [],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadFormacionAcademica.ctgEspecialidad.ctgCatalogoId",
		    	        	        		fieldLabel: "Especialidad",
		    	        	        		store: new Ext.data.SimpleStore({
		    	        	        			data: config.catalogos.ctgEspecialidades || [],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},{
		                            		xtype: "grid",
		                            		id: "redDiscapacidadFormacionAcademicaGrid",
		                            		store: new Ext.data.SimpleStore({
		                            			fields: [
													"redDiscapacidadFormacionAcademicaId",
													"ctgEscolaridadNombre",
													"ctgEspecialidadNombre"
												],
												data: config.redDiscapacidadFormacionAcademicaList || []
		                            		}),
		                            		columns: [
	                            		          {
													   xtype: "actioncolumn",
													   width: 30,
													   hidden: false,
													   items: [
												        {
												     	   icon: Asg.constants.CONTEXT_PATH + "/resources/images/delete.png", 
												     	   iconCls: "icon", 
												     	   handler: function(grid, rowIndex, colIndex) {
												     		   RedDiscapacidad.confirmProcess(grid, rowIndex, "redDiscapacidadFormacionAcademicaId");
												     	   }
												        }
												    ]
												  },
		                        		          {header: "Escolaridad", dataIndex: "ctgEscolaridadNombre", flex: 1},
		                        		          {header: "Especialidad", dataIndex: "ctgEspecialidadNombre", flex: 1}
		                    		        ],
		                    		        tbar: [
		                		               "->",
		                		               {
		                		            	   text: "Nuevo",
		                		            	   iconCls: Asg.constants.ADD_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.resetFormDetails("redDiscapacidadFormacionAcademicaForm");
		                		            	   }
		                		               },{
		                		            	   text: "Guardar",
		                		            	   iconCls: Asg.constants.SAVE_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.saveDetails("redDiscapacidadFormacionAcademicaForm","redDiscapacidadFormacionAcademicaGrid");
		                		            	   }
		                		               }
		            		                ],
		    	        	        		width: 605,
		    	        	        		height: 200,
		    	        	        		colspan: 2
		    	        	        	}
	    	        	        	]
			        	        },{
						        	xtype: "form",
						        	id: "redDiscapacidadIdiomaForm",
						        	border: false,
			        	        	bodyPadding: "5 5 5 5",
			        	        	layout: {
			        	        		type: "table",
										columns: 2,
										tableAttrs: {
								            style: {width: "615px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({labelAlign: "top", width: 300, allowBlank: false}),
			        	        	items: [
		    	        	        	{xtype: "label", text: "- Idiamos Extranjeros -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 2},
		    	        	        	{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadIdioma.ctgIdioma.ctgCatalogoId",
		    	        	        		fieldLabel: "Idioma",
		    	        	        		store: new Ext.data.SimpleStore({
		    	        	        			data: config.catalogos.ctgIdiomas || [],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadIdioma.ctgNivel.ctgCatalogoId",
		    	        	        		fieldLabel: "Nivel",
		    	        	        		store: new Ext.data.SimpleStore({
		    	        	        			data: config.catalogos.ctgNiveles || [],
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},{
		                            		xtype: "grid",
		                            		id: "redDiscapacidadIdiomaGrid",
		                            		store: new Ext.data.SimpleStore({
		                            			fields: [
													"redDiscapacidadIdiomaId",
													"ctgIdiomaNombre",
													"ctgNivelNombre"
												],
												data: config.redDiscapacidadIdiomaList || []
		                            		}),
		                            		columns: [
	                            		          {
													   xtype: "actioncolumn",
													   width: 30,
													   hidden: false,
													   items: [
												        {
												     	   icon: Asg.constants.CONTEXT_PATH + "/resources/images/delete.png", 
												     	   iconCls: "icon", 
												     	   handler: function(grid, rowIndex, colIndex) {
												     		   RedDiscapacidad.confirmProcess(grid, rowIndex, "redDiscapacidadIdiomaId");
												     	   }
												        }
												    ]
												  },
		                        		          {header: "Idioma", dataIndex: "ctgIdiomaNombre", flex: 1},
		                        		          {header: "Nivel", dataIndex: "ctgNivelNombre", flex: 1}
		                    		        ],
		                    		        tbar: [
		                		               "->",
		                		               {
		                		            	   text: "Nuevo",
		                		            	   iconCls: Asg.constants.ADD_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.resetFormDetails("redDiscapacidadIdiomaForm");
		                		            	   }
		                		               },{
		                		            	   text: "Guardar",
		                		            	   iconCls: Asg.constants.SAVE_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.saveDetails("redDiscapacidadIdiomaForm","redDiscapacidadIdiomaGrid");
		                		            	   }
		                		               }
		                		            	 
		            		                ],
		    	        	        		width: 605,
		    	        	        		height: 200,
		    	        	        		colspan: 2
		    	        	        	},
			        	        	]
						        }
		        	        ]
				        },{
				        	id: "redDiscapacidadPaso5",
				        	title: "Paso #5: Conocimientos y Habilidades",
				        	border: false,
				        	autoScroll: true,
				        	items: [
			        	        {
						        	xtype: "form",
						        	id: "redDiscapacidadConocimientosForm",
			        	        	bodyPadding: "5 5 5 5",
			        	        	border: false,
			        	        	layout: {
			        	        		type: "table",
										columns: 2,
										tableAttrs: {
								            style: {width: "615px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({labelAlign: "top", width: 300, allowBlank: false}),
			        	        	items: [
		    	        	        	{xtype: "label", text: "- Conocimientos -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 2},
		    	        	        	{
		                                    xtype: "combo",
		                                    id: "ctgAreaConocmientoId",
		                                    name: "redDiscapacidadConocimiento.ctgAreaConocmiento.ctgCatalogoId",
		                                    fieldLabel: "Area de Conocmiento",
		                                    store: new Ext.data.SimpleStore({
		                                    	data: config.catalogos.ctgAreaConocmientos || [],
		                                    	fields: ["id", "value"]
		                                    }),
		                                    displayField: "value",
		                                    valueField: "id",
		                                    allowBlank: false,
		                                    listeners: {
		                                    	change: function(){
		                                    		var currentValue = this.getValue();
		                                    		if(!Ext.isEmpty(currentValue)){
		                                    			var data = Asg.Combo.filter(currentValue, config.catalogos.ctgDetalleAreaConocimientos, 2);
		                                    			Asg.Combo.loadData("ctgDetalleAreasConocimientoId", data, false);
		                                			}else if(Ext.isEmpty(this.getValue())){
		                                				Asg.Combo.removeAll("ctgDetalleAreasConocimientoId", false);
		                                            }
		                                        }
		                                    }
		                                },{
		                                    xtype: "combo",
		                                    id: "ctgDetalleAreasConocimientoId",
		                                    name: "redDiscapacidadConocimiento.ctgDetalleAreasConocimiento.ctgDetalleAreaConocimientoId",
		                                    fieldLabel: "Detalle Conocimiento",
		                                    store: new Ext.data.SimpleStore({
		                                    	data: [],
		                                    	fields: ["id", "value"]
		                                    }),
		                                    displayField: "value",
		                                    valueField: "id"
		                            	},{
		                            		xtype: "grid",
		                            		id: "redDiscapacidadConocimientoGrid",
		                            		store: new Ext.data.SimpleStore({
		                            			fields: [
													"redDiscapacidadConocimientoId",
													"ctgAreaConocmientoNombre",
													"ctgDetalleAreaConocimientoDescripcion"
												],
												data: config.redDiscapacidadConocimientoList || [],
												groupers: [{property: "ctgAreaConocmientoNombre"}]
		                            		}),
		                            		features: [
                                               {ftype: "grouping", groupHeaderTpl: "{name}"}
	                                        ],
		                            		columns: [
												{
													   xtype: "actioncolumn",
													   width: 30,
													   hidden: false,
													   items: [
												     {
												  	   icon: Asg.constants.CONTEXT_PATH + "/resources/images/delete.png", 
												  	   iconCls: "icon", 
												  	   handler: function(grid, rowIndex, colIndex) {
												  		   RedDiscapacidad.confirmProcess(grid, rowIndex, "redDiscapacidadConocimientoId");
												  	   }
												     }
												 ]
												},
                            		          {header: "Detalle Area de Conocimiento", dataIndex: "ctgDetalleAreaConocimientoDescripcion", flex: 1}
                        		            ],
		                    		        tbar: [
		                		               "->",
		                		               {
		                		            	   text: "Nuevo",
		                		            	   iconCls: Asg.constants.ADD_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.resetFormDetails("redDiscapacidadConocimientosForm");
		                		            	   }
		                		               },{
		                		            	   text: "Guardar",
		                		            	   iconCls: Asg.constants.SAVE_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.saveDetails("redDiscapacidadConocimientosForm","redDiscapacidadConocimientoGrid");
		                		            	   }
		                		               }
		            		                ],
		    	        	        		width: 605,
		    	        	        		height: 200,
		    	        	        		colspan: 2
		    	        	        	}
	                            	]
			        	        },{
			        	        	xtype: "form",
						        	id: "redDiscapacidadHabilidadForm",
			        	        	bodyPadding: "5 5 5 5",
			        	        	border: false,
			        	        	layout: {
			        	        		type: "table",
										columns: 2,
										tableAttrs: {
								            style: {width: "615px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({labelAlign: "top", width: 300}),
			        	        	items: [
		    	        	        	{xtype: "label", text: "- Habilidades -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 2},
		    	        	        	{
		                                    xtype: "combo",
		                                    id: "ctgHabilidadId",
		                                    name: "redDiscapacidadHabilidad.ctgHabilidad.ctgCatalogoId",
		                                    fieldLabel: "Area de Habilidades",
		                                    store: new Ext.data.SimpleStore({
		                                    	data: config.catalogos.ctgHabilidades || [],
		                                    	fields: ["id", "value"]
		                                    }),
		                                    displayField: "value",
		                                    valueField: "id",
		                                    allowBlank: false,
		                                    listeners: {
		                                    	change: function(){
		                                    		var currentValue = this.getValue();
		                                    		if(!Ext.isEmpty(currentValue)){
		                                    			var data = Asg.Combo.filter(currentValue, config.catalogos.ctgDetalleHabilidades, 2);
		                                    			Asg.Combo.loadData("ctgDetalleHabilidadesId", data, false);
		                                			}else if(Ext.isEmpty(this.getValue())){
		                                				Asg.Combo.removeAll("ctgDetalleHabilidadesId", false);
		                                            }
		                                        }
		                                    }
		                                },{
		                                    xtype: "combo",
		                                    id: "ctgDetalleHabilidadesId",
		                                    name: "redDiscapacidadHabilidad.ctgDetalleHabilidades.ctgDetalleHabilidadId",
		                                    fieldLabel: "Detalle de Habilidades",
		                                    store: new Ext.data.SimpleStore({
		                                    	data: [],
		                                    	fields: ["id", "value"]
		                                    }),
		                                    displayField: "value",
		                                    valueField: "id"
		                            	},{
		                            		xtype: "grid",
		                            		id: "redDiscapacidadHabilidadGrid",
		                            		store: new Ext.data.SimpleStore({
		                            			fields: [
													"redDiscapacidadHabilidadId",
													"ctgHabilidadNombre",
													"ctgDetalleHabilidadDescripcion"
												],
												data: config.redDiscapacidadHabilidadList || [],
												groupers: [{property: "ctgHabilidadNombre"}]
		                            		}),
		                            		columns: [
	                        		           {
													   xtype: "actioncolumn",
													   width: 30,
													   hidden: false,
													   items: [
												     {
												  	   icon: Asg.constants.CONTEXT_PATH + "/resources/images/delete.png", 
												  	   iconCls: "icon", 
												  	   handler: function(grid, rowIndex, colIndex) {
												  		   RedDiscapacidad.confirmProcess(grid, rowIndex, "redDiscapacidadHabilidadId");
												  	   }
												     }
												 ]
												},
												{header: "Detalle de Habilidad", dataIndex: "ctgDetalleHabilidadDescripcion", flex: 1, minWidth: 150},
		                    		        ],
		                    		        features: [
                                               {ftype: "grouping", groupHeaderTpl: "{name}"}
	                                        ],
		                    		        tbar: [
		                		               "->",
		                		               {
		                		            	   text: "Nuevo",
		                		            	   iconCls: Asg.constants.ADD_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.resetFormDetails("redDiscapacidadHabilidadForm");
		                		            	   }
		                		               },{
		                		            	   text: "Guardar",
		                		            	   iconCls: Asg.constants.SAVE_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.saveDetails("redDiscapacidadHabilidadForm","redDiscapacidadHabilidadGrid");
		                		            	   }
		                		               }
		            		                ],
		    	        	        		width: 605,
		    	        	        		height: 200,
		    	        	        		colspan: 2
		    	        	        	},
			        	        	]
						        }
		        	        ]
				        },{
				        	id: "redDiscapacidadPaso6",
				        	title: "Paso #6: Datos de la Entrevista",
				        	border: false,
				        	autoScroll: true,
				        	items: [
			        	        {
						        	xtype: "form",
						        	id: "redDiscapacidadEntrevistaForm",
						        	bodyPadding: "5 5 5 5",
			        	        	border: false,
			        	        	layout: {
			        	        		type: "table",
										columns: 4,
										tableAttrs: {
								            style: {width: "610px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({labelAlign: "top", width: 300, colspan: 2}),
			        	        	items: [
										{xtype: "label", text: "- Datos de la Entrevista -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 4},
										{xtype: "label", text: "Lugar de desempe\u00F1o de actividades:", cls: "x-form-item", width: 200},
										{
											xtype: "textfield",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaLugarActividades",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaLugarActividades,
											maxLength: 250
										},
										{xtype: "label", text: "Lugar de entrevista:", cls: "x-form-item", width: 200},
										{
											xtype: "textfield",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaLugarEntrevista",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaLugarEntrevista,
											maxLength: 250
										},
										{xtype: "label", text: "Entrevistador:", cls: "x-form-item", width: 200},
										{
											xtype: "textfield",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaEntrevistador",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaEntrevistador,
											maxLength: 200
										},
										{xtype: "label", text: "Cargo:", cls: "x-form-item", width: 200},
										{
											xtype: "textfield",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaCargo",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaCargo,
											maxLength: 200
										},
										{xtype: "label", text: "Tel\u00E9fonos:", cls: "x-form-item", width: 200},
										{
											xtype: "textfield",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaTelefono",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaTelefono,
											vtype: "telefono",
											maxLength: 8
										},
										{xtype: "label", text: "Email:", cls: "x-form-item", width: 200},
										{
											xtype: "textfield",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaEmail",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaEmail,
											vtype: "email",
											maxLength: 250
										},
										{xtype: "label", text: "Horario de Entrevista:", cls: "x-form-item", width: 200},
										{
											xtype: "textfield",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaHora",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaHora,
											maxLength: 50
										},
										{xtype: "label", text: "D\u00EDas de Entrevista:", cls: "x-form-item", width: 200},
										{
											xtype: "textfield",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaDia",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaDia,
											maxLength: 50
										},
										{xtype: "label", text: "Observaciones:", cls: "x-form-item", width: 200},
										{
											xtype: "textarea",
											name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaObservaciones",
											value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatoEntrevistaObservaciones,
											height: 50,
											maxLength: 250
										},{
		    	        	        		xtype: "hidden",
		    	        	        		name: "redDiscapacidadDatosEntrevista.redDiscapacidadDatosEntrevistaId",
		    	        	        		value: config.redDiscapacidadDatosEntrevista.redDiscapacidadDatosEntrevistaId,
		    	        	        		width: 10
		    	        	        	}
									]
			        	        },{
			        	        	xtype: "form",
						        	id: "redDiscapacidadSucursalesForm",
						        	bodyPadding: "5 5 5 5",
			        	        	border: false,
			        	        	layout: {
			        	        		type: "table",
										columns: 4,
										tableAttrs: {
								            style: {width: "610px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({labelAlign: "top", width: 300, colspan: 2}),
			        	        	items:[
		    	        	        	{xtype: "label", text: "- Sucursales -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 4},
		    	        	        	{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadSucursales.redDiscapacidadSucursalNombre",
		    	        	        		fieldLabel: "Nombre",
		    	        	        		allowBlank: false,
		    	        	        		maxLength: 200
		    	        	        	},{
		    	        	        		xtype: "combo",
		    	        	        		name: "redDiscapacidadSucursales.redDiscapacidadSucursalOficina",
		    	        	        		fieldLabel: "Es oficina Central",
		    	        	        		store: new Ext.data.SimpleStore({
		                                        data: Asg.Combo.yesnoArray(),
		                                        fields: ["id", "value"]
			                                }),
			                                displayField: "value",
			                                valueField: "id"
		    	        	        	},{
		    	        	        		xtype: "textarea",
		    	        	        		name: "redDiscapacidadSucursales.redDiscapacidadSucursalDireccion",
		    	        	        		fieldLabel: "Direccio\u00F3n",
		    	        	        		height: 50,
		    	        	        		maxLength: 250,
		    	        	        		width: 600,
		    	        	        		colspan: 4
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadSucursales.redDiscapacidadSucursalTelefono",
		    	        	        		fieldLabel: "Tel\u00E9fono",
		    	        	        		allowBlank: false,
		    	        	        		vtype: "telefono",
		    	        	        		maxLength: 8,
		    	        	        		width: 140,
		    	        	        		colspan: 1
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadSucursales.redDiscapacidadSucursalFax",
		    	        	        		fieldLabel: "FAX",
		    	        	        		vtype: "telefono",
		    	        	        		maxLength: 8,
		    	        	        		width: 150,
		    	        	        		colspan: 1
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadSucursales.redDiscapacidadSucursalEmail",
		    	        	        		fieldLabel: "Email",
		    	        	        		vtype: "email",
		    	        	        		maxLength: 250
		    	        	        	},{
		                                    xtype: "combo",
		                                    id: "ctgDepartamentoId",
		                                    name: "redDiscapacidadSucursales.ctgDepartamento.ctgDepartamentoId",
		                                    fieldLabel: "Departamento",
		                                    store: new Ext.data.SimpleStore({
		                                    	data: config.catalogos.ctgDepartamentos || [],
		                                    	fields: ["id", "value"]
		                                    }),
		                                    displayField: "value",
		                                    valueField: "id",
		                                    listeners: {
		                                    	change: function(){
		                                    		var currentValue = this.getValue();
		                                    		if(!Ext.isEmpty(currentValue)){
		                                    			var data = Asg.Combo.filter(currentValue, config.catalogos.ctgMunicipios, 2);
		                                    			Asg.Combo.loadData("ctgMunicipioId", data, false);
		                                    			Asg.Form.setRequired("ctgMunicipioId", true);
		                                			}else if(Ext.isEmpty(this.getValue())){
		                                				Asg.Combo.removeAll("ctgMunicipioId", false);
		                                                Asg.Form.setRequired("ctgMunicipioId", false);
		                                            }
		                                        }
		                                    }
		                                },{
		                                    xtype: "combo",
		                                    id: "ctgMunicipioId",
		                                    name: "redDiscapacidadSucursales.ctgMunicipio.ctgMunicipioId",
		                                    fieldLabel: "Municipio",
		                                    store: new Ext.data.SimpleStore({
		                                    	data: [],
		                                    	fields: ["id", "value"]
		                                    }),
		                                    displayField: "value",
		                                    valueField: "id"
		                            	},{
		                            		xtype: "grid",
		                            		id: "redDiscapacidadSucursalGrid",
		                            		store: new Ext.data.SimpleStore({
		                            			fields: [
													"redDiscapacidadSucursales.redDiscapacidadSucursalId",
													"redDiscapacidadSucursales.redDiscapacidadSucursalNombre",
													"redDiscapacidadSucursales.redDiscapacidadSucursalOficina",
													"redDiscapacidadSucursales.redDiscapacidadSucursalDireccion",
													"redDiscapacidadSucursales.redDiscapacidadSucursalTelefono",
													"redDiscapacidadSucursales.redDiscapacidadSucursalFax",
													"redDiscapacidadSucursales.redDiscapacidadSucursalEmail",
													"redDiscapacidadSucursales.ctgDepartamento.ctgDepartamentoId",
													"redDiscapacidadSucursales.ctgDepartamento.ctgDepartamentoNombre",
													"redDiscapacidadSucursales.ctgMunicipio.ctgMunicipioId",
													"redDiscapacidadSucursales.ctgMunicipio.ctgMunicipioNombre"
												],
												data: config.redDiscapacidadSucursalesList || []
		                            		}),
		                            		selModel: {
							        			listeners: {
							        				selectionchange: function(selectionModel, records){
							        					RedDiscapacidad.selectionChange(records, "redDiscapacidadSucursalesForm");
							        				}
							        			}
		                            		},
		                            		columns: [
		                        		          {
													   xtype: "actioncolumn",
													   width: 30,
													   hidden: false,
													   items: [
												     {
												  	   icon: Asg.constants.CONTEXT_PATH + "/resources/images/delete.png", 
												  	   iconCls: "icon", 
												  	   handler: function(grid, rowIndex, colIndex) {
												  		   RedDiscapacidad.confirmProcess(grid, rowIndex, "redDiscapacidadSucursales.redDiscapacidadSucursalId");
												  	   }
												     }
												 ]
												},
												{header: "Nombre", dataIndex: "redDiscapacidadSucursales.redDiscapacidadSucursalNombre", flex: 1, minWidth: 150},
		                        		          {header: "Tel\u00E9fono", dataIndex: "redDiscapacidadSucursales.redDiscapacidadSucursalTelefono", width: 80},
		                        		          {header: "Email", dataIndex: "redDiscapacidadSucursales.redDiscapacidadSucursalEmail", width: 150},
		                        		          {header: "Departamento", dataIndex: "redDiscapacidadSucursales.ctgDepartamento.ctgDepartamentoNombre", width: 150},
		                        		          {header: "Municipio", dataIndex: "redDiscapacidadSucursales.ctgMunicipio.ctgMunicipioNombre", width: 150}
		                    		        ],
		                    		        tbar: [
		                		               "->",
		                		               {
		                		            	   text: "Nuevo",
		                		            	   iconCls: Asg.constants.ADD_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.resetFormDetails("redDiscapacidadSucursalesForm");
		                		            	   }
		                		               },{
		                		            	   text: "Guardar",
		                		            	   iconCls: Asg.constants.SAVE_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.saveDetails("redDiscapacidadSucursalesForm","redDiscapacidadSucursalGrid");
		                		            	   }
		                		               }
		            		                ],
		    	        	        		width: 605,
		    	        	        		height: 200,
		    	        	        		colspan: 4
		    	        	        	},{
		    	        	        		xtype: "hidden",
		    	        	        		name: "redDiscapacidadSucursales.redDiscapacidadSucursalId",
		    	        	        		width: 10
		    	        	        	}
	                            	]
			        	        },{
			        	        	xtype: "form",
						        	id: "redDiscapacidadContactoForm",
						        	bodyPadding: "5 5 5 5",
			        	        	border: false,
			        	        	layout: {
			        	        		type: "table",
										columns: 4,
										tableAttrs: {
								            style: {width: "610px", "margin-top": "5px;"},
								            align: "center"
										}
			        	        	},
			        	        	defaults: Asg.Form.defaults({labelAlign: "top", width: 300, colspan: 2}),
			        	        	items:[
		    	        	        	{xtype: "label", text: "- Contactos -", cls: "x-form-item", style: "text-align: center; font-weight: bold", colspan: 4},
		    	        	        	{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadContacto.redDiscapacidadContactoNombres",
		    	        	        		fieldLabel: "Nombres",
		    	        	        		allowBlank: false,
		    	        	        		maxLength: 200
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadContacto.redDiscapacidadContactoApellidos",
		    	        	        		fieldLabel: "Apellidos",
		    	        	        		allowBlank: false,
		    	        	        		maxLength: 200
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadContacto.redDiscapacidadContactoPuesto",
		    	        	        		fieldLabel: "Puesto",
		    	        	        		maxLength: 100
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadContacto.redDiscapacidadContactoTelefono",
		    	        	        		fieldLabel: "Tel\u00E9fono",
		    	        	        		allowBlank: false,
		    	        	        		vtype: "telefono",
		    	        	        		maxLength: 8,
		    	        	        		width: 140,
		    	        	        		colspan: 1
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadContacto.redDiscapacidadContactoFax",
		    	        	        		fieldLabel: "FAX",
		    	        	        		vtype: "telefono",
		    	        	        		maxLength: 8,
		    	        	        		width: 150,
		    	        	        		colspan: 1
		    	        	        	},{
		    	        	        		xtype: "textfield",
		    	        	        		name: "redDiscapacidadContacto.redDiscapacidadContactoEmail",
		    	        	        		fieldLabel: "Email",
		    	        	        		vtype: "email",
		    	        	        		maxLength: 250
		    	        	        	},{
		                                    xtype: "combo",
		                                    id: "redDiscapacidadContactoSucursalId",
		                                    name: "redDiscapacidadContacto.redDiscapacidadSucursales.redDiscapacidadSucursalId",
		                                    fieldLabel: "Sucursal",
		                                    allowBlank: false,
		                                    store: new Ext.data.SimpleStore({
		                                    	data: config.redDiscapacidadSucursalesList || [],
		                                    	fields: ["id", "value"]
		                                    }),
		                                    displayField: "value",
		                                    valueField: "id",
		                                    colspan: 4
		                                },{
		                            		xtype: "grid",
		                            		id: "redDiscapacidadContactoGrid",
		                            		store: new Ext.data.SimpleStore({
		                            			fields: [
													"redDiscapacidadContacto.redDiscapacidadContactoId",
													"redDiscapacidadContacto.redDiscapacidadContactoNombreCompleto",
													"redDiscapacidadContacto.redDiscapacidadContactoNombres",
													"redDiscapacidadContacto.redDiscapacidadContactoApellidos",
													"redDiscapacidadContacto.redDiscapacidadContactoPuesto",
													"redDiscapacidadContacto.redDiscapacidadContactoTelefono",
													"redDiscapacidadContacto.redDiscapacidadContactoCelular",
													"redDiscapacidadContacto.redDiscapacidadContactoEmail",
													"redDiscapacidadContacto.redDiscapacidadSucursales.redDiscapacidadSucursalId",
													"redDiscapacidadSucursal.redDiscapacidadSucursalNombre"
												],
												data: config.redDiscapacidadContactoList || []
		                            		}),
		                            		selModel: {
							        			listeners: {
							        				selectionchange: function(selectionModel, records){
							        					RedDiscapacidad.selectionChange(records, "redDiscapacidadContactoForm");
							        				}
							        			}
		                            		},
		                            		columns: [
		                            		      {
						                        	   xtype: "actioncolumn",
						                        	   width: 30,
							        	        	   hidden: false,
							        	        	   items: [
						        	        	           {
						        	        	        	   icon: Asg.constants.CONTEXT_PATH + "/resources/images/delete.png", 
						        	        	        	   iconCls: "icon", 
						        	        	        	   handler: function(grid, rowIndex, colIndex) {
						        	        	        		   RedDiscapacidad.confirmProcess(grid, rowIndex, "redDiscapacidadContacto.redDiscapacidadContactoId");
						        	        	        	   }
						        	        	           }
						    	        	           ]
						                          },
		                        		          {header: "Nombre Completo", dataIndex: "redDiscapacidadContacto.redDiscapacidadContactoNombreCompleto", flex: 1, minWidth: 150},
		                        		          {header: "Puesto", dataIndex: "redDiscapacidadContacto.redDiscapacidadContactoPuesto", width: 130},
		                        		          {header: "Tel\u00E9fono", dataIndex: "redDiscapacidadContacto.redDiscapacidadContactoTelefono", width: 80}
		                    		        ],
		                    		        tbar: [
		                		               "->",
		                		               {
		                		            	   text: "Nuevo",
		                		            	   iconCls: Asg.constants.ADD_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.resetFormDetails("redDiscapacidadContactoForm");
		                		            	   }
		                		               },{
		                		            	   text: "Guardar",
		                		            	   iconCls: Asg.constants.SAVE_ICON,
		                		            	   handler: function(){
		                		            		   RedDiscapacidad.saveDetails("redDiscapacidadContactoForm","redDiscapacidadContactoGrid");
		                		            	   }
		                		               }
		            		                ],
		    	        	        		width: 605,
		    	        	        		height: 200,
		    	        	        		colspan: 4
		    	        	        	},{
								        	xtype: "hidden",
								        	name: "redDiscapacidadContacto.redDiscapacidadContactoId",
								        	width: 10
								        }
			        	        	]
						        }
		        	        ]
				        },{
				        	title: "Paso #7: Revisi\u00F3n de la Informaci\u00F3n",
				        	border: false,
				        	items: [
			        	        {xtype: "label", text: "Ahora que ha completado y guardado los datos de la oferta se necesita que \u00E9sta sea activada en el " +
			        	        		"Sistema RED para que los Demandantes registrados puedan ser vinculados", cls: "x-form-item"}
		        	        ]
				        }
			        ],
			        bbar: [
		               "->",
		               {
		            	   text: "Anterior",
		            	   id: "redDiscapacidadSiguienteButton",
		            	   handler: function(btn) {
		            		   RedDiscapacidad.navigate(btn.up("panel"), "prev");
		                   },
		                   disabled: true
		               },"-",
		               {
		            	   text: "Siguiente",
		            	   id: "redDiscapacidadAnteriorButton",
		            	   handler: function(btn) {
		            		   RedDiscapacidad.navigate(btn.up("panel"), "next");
		                   }
		               }, "-",
		               {
		            	   text: "Cerrar",
		            	   handler: function(){
		            		   Ext.WindowMgr.get("redDiscapacidadWindow").close();
	            		   }
		               }
	                ]
				}
			}).show();
		}
	};
}();